/*
 * Ch01MySum.cpp
 *
 *  Created on: 2012-8-28
 *      Author: JamesZOU
 */



#include <iostream>
/**
 * ctrl   +   Z
 * stop input
 */
int my_sum()
{
	int sum = 0, value;
	// read till end-of-file, calculating a running total of all values read
	while (std::cin >> value)
		sum += value; // equivalent to sum = sum + value
	std::cout << "Sum is: " << sum << std::endl;

	return 0;
}

//int main(){
//	return my_sum();
//}
